package com.d0305;

public class Racing {
    int topSpeed =100;

    void upgradeEngine() {
        RepairFactory factory = new RepairFactory();
        factory.upgradeEngine(this);
    }
    public  static void  main(String[] args){
        Racing racing = new Racing();
        System.out.println("升级前"+racing.topSpeed);
        racing.upgradeEngine();
        System.out.println("升级后"+racing.topSpeed);
    }
}
